#pragma once
#ifndef __G_INPUT_DEVICE_KEYBOARD_H__
#define __G_INPUT_DEVICE_KEYBOARD_H__


#include "GInput.h"
#include "GInputDevice.h"
#include "GInputDefinitions.h"

namespace GEngine
{

	class GKeyboardState
	{
	public:
		bool					SemanticStates[G_KS_COUNT];

								GKeyboardState();
								~GKeyboardState();

		void					Reset();

		const GKeyboardState&	operator=(const GKeyboardState& Other);
	};

	class GModule;

	class GInputDeviceKeyboard : public GInputDevice
	{
	protected:
		GKeyboardState		CurrentState;
		GKeyboardState		PreviousState;
		
							GInputDeviceKeyboard(GModule* Owner, void* DeviceHandle);
		virtual				~GInputDeviceKeyboard();

		void				AdvanceState();

	public:
		virtual GUInt32		GetType() const OVERRIDE;
		virtual const char*	GetName() const OVERRIDE;

		virtual void		Reset() OVERRIDE;
		virtual bool		Update() OVERRIDE;

		virtual bool		CheckInput(const GInput* Input) const OVERRIDE;

		static const char*	GetSemanticName(GKeyboardSemantics Semantic);
	};

};

#endif